package pruebas.JTable.javahispano;

import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import javax.swing.JScrollPane;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.JOptionPane;
import java.awt.*;
import java.awt.event.*;

public class SimpleTable4 extends JFrame {
	public SimpleTable4() {
		super("SimpleTable4");
		MyTableModel myModel = new MyTableModel();
		
		JTable table = new JTable(myModel);
		table.setPreferredScrollableViewportSize(new Dimension(500, 70));
		
		//	Creatamos un contenedor para la Tabla
		JScrollPane scrollPane = new JScrollPane(table);
		//	Agregamos nuestra tabla al contenedor
		getContentPane().add(scrollPane, BorderLayout.CENTER);
		
		addWindowListener(new WindowAdapter() {
			                  public void windowClosing(WindowEvent e) {
				                System.exit(0);
			                  }
		                 }
	   );
   }
}

